<template>
	<view class="about clearfix ">
		<cu-custom bgColor="bg-white" isBack>
			<block slot="content">联系客服</block>
		</cu-custom>
		<view class="flex flex-direction align-center mt5 bg-white">
			<view class="mt20 ">温馨提示</view>
			<view class="mt20 ">客服工作时间: {{time}}</view>
			<view class="py10 mt25 bt1 wp100"></view>
			<view class="px15 flex align-start mt10">如果您有任何疑问可拨打以下号码：</view>
			<view class="flex align-center mt20">
				<image src="/static/user/phone.png" class="blockphone" mode=""></image>
				<text class="ml5 text-prices f18">{{phone}}</text>
			</view>
			<view class="mt25 button-jianbian phone-box discenter" @click="puhone">立即拨打</view>
			<image :src="wxpic" class="qrcode-pic" mode=""></image>
			<view class="mt8 mb20">微信客服</view>
		</view> 
		
	</view>
</template>

<script>
import { mapState, mapActions } from 'vuex'
export default {
	data() {
		return {
			time:'',
			phone:'',
			wxpic:''
		}
	},
	onLoad() {
		this.getData()
	},
	methods: {
		async getData() {
			let { data } = await this.$http.post('user.kefu')
			this.time=data.time
			this.phone=data.tel
			this.wxpic=data.pic
		},
		puhone(){
			uni.makePhoneCall({
			    phoneNumber: this.phone //仅为示例
			});
		}
	}
}
</script>

<style lang="less">
.bg-f7{
	background-color: #F7F7F7;
}
.blockphone{
	width: 40rpx;
	height: 32rpx;
}
.phone-box{
	width: 288rpx;
	height: 62rpx;
	color: #FFFFFF;
	border-radius: 30rpx;
}
.qrcode-pic{
	width: 230rpx;
	height: 230rpx;
	margin-top: 150rpx;
}
</style>
